package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.user.client.impl.UserInfoDegradeFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserInfoDegradeFeignClient.class)
public interface UserInfoFeignClient {

	@GetMapping("/api/user/userInfo/findUserById/{userId}")
	public Result<UserInfo> findUserById(@PathVariable Long userId);
	@PostMapping("/api/user/userInfo/userIsPaidTrack/{albumId}")
	public Result<Map<Long,Integer>> userIsPaidTrack(@PathVariable Long albumId, @RequestBody List<Long> trackIdList);

	@GetMapping("/api/user/userInfo/findUserPaidTrackList/{albumId}")
	public Result<List<Long>> findUserPaidTrackList(@PathVariable Long albumId);
	@GetMapping("/api/user/userInfo/isUserPaidAlbum/{albumId}")
	public Result<Boolean> isUserPaidAlbum(@PathVariable Long albumId);

	@GetMapping("/api/user/userInfo/updateVipExpireHandler")
	public Result<Void> updateVipExpireHandler();





}